#电话号码的字母组合
from typing import  List
class Solution:
    def letterCombinations(self, digits: str) -> List[str]:
        if not digits:
            return []

        digit_map = {
            '2': 'abc',
            '3': 'def',
            '4': 'ghi',
            '5': 'jkl',
            '6': 'mno',
            '7': 'pqrs',
            '8': 'tuv',
            '9': 'wxyz'
        }

        result = list(digit_map[digits[0]])

        for i in range(1, len(digits)):
            current_digit = digits[i]
            letters = digit_map[current_digit]
            temp = []
            for s in result:
                for letter in letters:
                    temp.append(s + letter)
            result = temp

        return result